<template>
	<view>
		<my-animation :share="share" :height="height" @display="display">
			<template v-slot:spOne>
				<view class="title">
					<view class="title-left"></view>
					<view class="title-center">
						<text>{{title}}</text>
					</view>
					<view class="title-right">
						<view class="title-close">
							<image :src="closeImg" @click="display"></image>
						</view>
					</view>
				</view>
				<view class="con">
					<slot name="conSlot"></slot>
				</view>
				<view class="bottom" v-if="isShowBtn">
					<view class="btn" @click="clickSuccess">
						<text>确定</text>
					</view>
				</view>
			</template>
		</my-animation>
	</view>
</template>

<script>
	import myAnimation from '@/components/common/my-animation/my-animation.vue'

	export default {
		components: {
			myAnimation
		},
		props: {
			share: {
				type: Boolean,
				default: false
			},
			height: {
				type: String,
				default: '700'
			},
			title: {
				type: String,
				default: ''
			},
			isShowBtn: {
				type: Boolean,
				default: true
			}
		},
		data() {
			return {
				closeImg: require('@/static/img/common/clear.svg')
			}
			velu
		},
		methods: {
			//提交输入文字
			clickSuccess() {
				this.$emit('clickSuccess')
			},
			//关闭弹框
			display() {
				this.$emit('display')
			}
		}
	}
</script>

<style scoped lang="scss">
	.title {
		display: flex;
		height: 100rpx;

		.title-left {
			width: 20%;
		}

		.title-center {
			width: 60%;
			line-height: 100rpx;
			text-align: center;

			text {
				font-size: 36rpx;
				font-weight: 500;
				color: rgba(56, 56, 56, 1);
			}
		}

		.title-right {
			width: 20%;
			text-align: right;

			image {
				margin-top: 25rpx;
				margin-right: 20rpx;
				width: 50rpx;
				height: 50rpx;
			}

		}
	}

	.con {
		height: 500rpx;

	}

	.bottom {
		height: 100rpx;

		.btn {
			width: 80%;
			height: 80rpx;
			border-radius: 60rpx;
			text-align: center;
			font-size: 32rpx;
			color: #fff;
			line-height: 80rpx;
			background-color: rgba(64, 219, 126, 1);
			margin-left: 10%;
		}
	}
</style>
